import React from 'react'
import {
  Outlet, // 相当于 this.props.children
  NavLink,// 模拟a标签跳转
} from "react-router-dom"

import {mainRouter} from "../router/router_config"

function Index() {
  return (
    <div >
      
      <header>Index</header>
      <main>
        <Outlet></Outlet>
      </main>
      <footer>
        {
          mainRouter.map((item,index)=>{
            return <NavLink key={index} to={item.path}>{item.title}</NavLink>
          })
        }
      </footer>
      
    </div>
  )
}

export default Index
